package Myfunc

import "github.com/gin-gonic/gin"

type Person struct {
	Name string
	Age  int
}

func GetIndex(context *gin.Context) {
	age := 19
	str := [...]string{
		"张三",
		"李四",
		"王五",
	}
	var username = "丽丽"
	var username1 = ""
	var flag bool = true

	var person Person = Person{
		Name: "王强",
		Age:  22,
	}

	map_data := map[string]interface{}{
		"str":       str,
		"age":       age,
		"flag":      flag,
		"username":  username,
		"username1": username1,
		"person":    person,
	}

	context.HTML(200, "demo01/index.html", map_data)
}
